Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix peerstore apocalypse redux #265

Merged
merged 3 commits into from
Jan 20, 2018
Merged

fix peerstore apocalypse redux #265

merged 3 commits into from
Jan 20, 2018

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Jan 20, 2018

This commit

  1. Registers the identify service for disconnect notifications (so we don't just keep all observed addresses indefinitely).
  2. Prevents us from repeatedly extending the lifetimes (on disconnect) of all observed addresses if a peer keeps on reconnecting.

It also fixes two race conditions:

  1. We may end up processing a disconnect after a re-connect and may accidentally give the addresses associated with that peer a RecentlyConnectedAddrTTL instead of a ConnectedAddrTTL.
  2. We may end up processing a connect after the associated disconnect storing the associated peer addresses indefinitely.

This commit prevents us from repeatedly extending the lifetimes of all observed
addresses if a peer keeps on reconnecting.

It also fixes two race conditions:

1. We may end up processing a disconnect after a re-connect and may
accidentally give the addresses associated with that peer a
RecentlyConnectedAddrTTL instead of a ConnectedAddrTTL.

2. We may end up processing a connect after the associated disconnect storing
the associated peer addresses indefinitely.
@ghost ghost assigned Stebalien Jan 20, 2018
@ghost ghost added the status/in-progress In progress label Jan 20, 2018
This way, we actually process disconnect notifications (and reduce the lifetime
on peer addr records).
@Stebalien Stebalien merged commit 3dd953f into master Jan 20, 2018
@ghost ghost removed the status/in-progress In progress label Jan 20, 2018
@Stebalien Stebalien deleted the fix/undead-peer-addrs branch January 20, 2018 06:57
@MarcoPolo MarcoPolo mentioned this pull request Jul 7, 2022
41 tasks
marten-seemann added a commit that referenced this pull request Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant